
import { getAsyncPage } from '@/utils/asyncComponentLoader'

export default {
    path: 'water-data',
    name: 'WaterData',
    component: getAsyncPage(() => import('@/components/nav/RouteCards.vue')),
    meta: {
        title: '水资源数据',
    },
    children: [{
        path: 'WaterDataCenter',
        name: 'WaterDataCenter',
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        redirect: { name: 'ChartAnalysis' },
        meta: {
            title: '用水数据中心',
            icon: 'pie',
            menu: '供水'
        },
        children: [

            {
                path: 'chart-analysis',
                name: 'WaterChartAnalysis',
                component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterDataCenter/ChartAnalysis/index.vue')),
                meta: {
                    title: '总览',
                    permission: ['view_water_chart']
                }
            }, {
                path: 'area-statistics',
                name: 'WaterAreaChartAnalysis',
                component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterDataCenter/AreaChartAnalysis/index.vue')),
                meta: {
                    title: '按区域统计',
                    permission: ['view_water_chart']
                }
            }, {
                // 按用途统计
                path: 'subcategory',
                name: 'WaterSubcategoryChartAnalysis',
                component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterDataCenter/Subcategory/index.vue')),
                meta: {
                    title: '按用途统计',
                    permission: ['view_water_chart']
                }
            }
        ]
    }, {
        path: 'intelligent-meter',
        name: 'WaterIntelligentMeter',
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        redirect: { name: 'DailyMeter' },
        meta: {
            title: '智能抄表',
            icon: 'intelligentMeter',
            menu: '供水'
        },
        children: [{
            path: 'daily-meter',
            name: 'WaterDailyMeter',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/IntelligentMeter/DailyMeter/index.vue')),
            meta: {
                title: '日抄表记录',
                permission: ['view_water_daily_statistics_report']
            }
        }, {
            path: 'monthly-meter',
            name: 'WaterMonthlyMeter',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/IntelligentMeter/MonthlyMeter/index.vue')),
            meta: {
                title: '日统计报表',
                permission: ['view_water_daily_statistics_report_detail']
            }
        }, {
            path: 'annual-meter',
            name: 'WaterAnnualMeter',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/IntelligentMeter/AnnualMeter/index.vue')),
            meta: {
                title: '月统计报表',
                permission: ['view_water_month_statistics_report']
            }
        }, {
            path: 'daily-report',
            name: 'WaterDailyReport',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/IntelligentMeter/DailyReport/index.vue')),
            meta: {
                title: '按时段按日报表',
                permission: ['view_water_daily_report']
            }
        }]
    }, {
        path: 'water-cost',
        name: 'WaterWaterCost',
        redirect: { name: 'WaterPriceView' },
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        meta: {
            title: '用水成本管理',
            icon: 'cost',
            menu: '供水'
        },
        children: [{
            path: 'price-view',
            name: 'WaterPriceView',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterCost/PriceView/index.vue')),
            meta: {
                title: '用水成本概览',
                permission: ['view_water_cost'],
            }
        }, {
            path: 'price-setting',
            name: 'WaterPriceSetting',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterCost/PriceSetting/index.vue')),
            meta: {
                title: '水源单价设置',
                permission: ['set_water_price'],

            }
        }, {
            path: 'price-input',
            name: 'WaterPriceInput',
            component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterCost/PriceInput/index.vue')),
            meta: {
                title: '实缴水费记录',
                permission: ['allow_input_water_charge'],
            }
        }]
    }, {
        //水平衡
        path: 'water-balance',
        name: 'WaterBalance',
        component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterBalance/index.vue')),
        meta: {
            title: '水平衡',
            permission: ['view_water_balance'],
            icon: 'balance',
            menu: '供水'
        }
    }, {
        // 用水单耗定额
        path: 'water-consumption-quota',
        name: 'WaterConsumptionQuota',
        component: getAsyncPage(() => import('@/views/EnergyData/WaterData/WaterConsumptionQuota/index.vue')),
        meta: {
            menu: '供水',
            title: '用水单耗定额',
            icon: 'quota',
            permission: ['view_water_consumption_quota'],
            width: '240px',
            height: '415px'
        }
    }]
}